package main

import (
	"./fxconfig"
	"./fxserversocket"
	"./fxwebserversocket"
	"fmt"
)

func main() {

	// 获取冒号为分隔符的键值
	tcpaddress := fxconfig.GetConfigStr("tcpTowebsocket", "tcpaddress")
	remote_webaddress := fxconfig.GetConfigStr("tcpTowebsocket", "remote_webaddress")
	fmt.Printf("tcpaddress=%s,remote_webaddress=%s\n",tcpaddress,remote_webaddress)
	webaddress := fxconfig.GetConfigStr("websocketTotcp", "webaddress")
	remote_tcpaddress := fxconfig.GetConfigStr("websocketTotcp", "remote_tcpaddress")
	fmt.Printf("webaddress=%s,remote_tcpaddress=%s\n",webaddress,remote_tcpaddress)
	//tcpserversoketAddr:="192.168.40.131:8810"
	//webserversoketAddr:="192.168.40.131:8811"

	go fxserversocket.TcpSocketStart(tcpaddress,remote_webaddress)
	go fxwebserversocket.WebSocketStart(webaddress,remote_tcpaddress)

	select {}
}
